package com.hq.service.impl;

import com.hq.dao.AdminDao;
import com.hq.pojo.Admin;

import com.hq.service.AdminService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class AdminServiceImpl implements AdminService {
    @Resource
    AdminDao adminDao;

    @Override
    public Admin logAdmin(String admin_name, String admin_password) throws Exception {
        return adminDao.logAdmin(admin_name,admin_password);
    }

    @Override
    public Admin getAdmin(String admin_id) throws Exception {
        return adminDao.getAdmin(admin_id);
    }

    @Override
    public int addAdmin(Admin admin) throws Exception {
        return adminDao.addAdmin(admin);
    }

    @Override
    public int delAdmin(String admin_id) throws Exception {
        return adminDao.delAdmin(admin_id);
    }

    @Override
    public int updAdmin(Admin admin) throws Exception {
        return adminDao.updAdmin(admin);
    }

    @Override
    public List<Admin> selAdmin() throws Exception {
        return adminDao.selAdmin();
    }

    @Override
    public int getCounts() throws Exception {
        return adminDao.getCounts();
    }

}
